<template>
  <view>
    <!-- 条件编译小组件 -->
    <ifdef></ifdef>
    <view class="cfb">
      <view v-for="(itemX, indexX) in 9" :key="indexX">
        <block v-for="(itemY, indexY) in 9" :key="indexY">
          <text v-if="indexY + 1 <= indexX + 1" space="nbsp" decode="true">
            {{ indexY + 1 }}*{{ indexX + 1 }}={{ indexX + 1 * indexY + 1 }}
          </text>
        </block>
      </view>
    </view>
    <view class="fen">
      <text>分数为：{{ num }}</text>
      <view v-if="90 <= num">
        <text>大于90，优秀</text>
      </view>
      <view v-else-if="80 <= num && num < 90">
        <text>80-90，良好</text>
      </view>
      <view v-else-if="70 <= num && num < 80">
        <text>70-80，中等</text>
      </view>
      <view v-else-if="60 <= num && num < 70">
        <text>60-70，及格</text>
      </view>
      <view v-else-if="num < 60">
        <text>小于60，不及格</text>
      </view>
    </view>
    <navigator open-type="navigate" url="../4-17/4-17"><button type="primary">跳转到4-17测试多监听</button></navigator>
  </view>
</template>

<script>
  import ifdef from '../../components/ifdef/ifdef.vue';
export default {
  components: {
    ifdef
  },
  data() {
    return {
      num: 60
    };
  }
};
</script>

<style lang="less">
.cfb {
  font-size: 12px;
  > view {
    > text {
      margin-right: 0.5em;
    }
  }
}
</style>
